home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1984 Half 1
/
rerun-1984-01-06-side-b.d64
/
zelaz64 jan p42
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
151 lines
5 printchr$(147)
10 print"****************************************"
12 print"* *"
14 print"* canyons of zelaz *"
16 print"* copyright 1983 *"
18 print"* wizardworks software *"
20 print"* *"
22 print"* written by gary d mcclellan *"
24 print"* p.o. box 1750 *"
26 print"* flagstaff, az 86002 *"
28 print"* *"
30 print"****************************************"
60 of=54272:gosub500:gosub900:ti$="000000":ff=16:y=71:pokev+1,y:gosub400
97 rem**********************************
98 rem* main program loop *
99 rem**********************************
100 cs=0:cp=0:pokev+31,0:j=peek(56320)
105 if(jand16)or(fu<1)thenc1=-9:pokead,o:pokewa,0:goto150
107 poke54296,15:pokead,88:pokesr,240:pokewa,129:fu=fu-3.5:c1=5.5:poke2040,14
110 ifnotjand8thenx1=x1+.25:fu=fu-.5
112 ifnotjand4thenx1=x1-.25:fu=fu-.5
113 ifnotjand1thenfu=fu+1.75:c1=32
150 poke55296,2:poke55326,2:c2=64/c1:v2=v1-.4+.2*c2:a2=a2+.1*(v1+v2):v1=v2
155 cp=peek(v+31)and1:ifcp=0thencr=0
176 y=(222-int(a2/d)):x=x+x1:ify<55thenx1=x1*2
177 ifx<1orx>254ory<45thengosub300
178 poke53279,0:pokev,x:pokev+1,y:ifpeek(53279)and1thencr=cr+1:ifcr>1thencs=1
180 printh$p$p$p$chr$(17)tab(32)ti$:printp$tab(33)str$(int(fu))+" "
185 printp$tab(33)str$(int(a2))+" ":printp$tab(32)"v:"str$(int(v2))+" "
186 hv$=str$(x1*3)+" ":printtab(32)"h:"left$(hv$,5)
190 ff=peek(v+30)and30:ifffthengosub400
195 if(y>222andv2<-10)orcsthengosub300
200 poke55296,7:poke55326,7:poke2040,15:goto100
297 rem ********************************
298 rem * mission report routine *
299 rem ********************************
300 pokenh,2:pokenl,179:poke54296,15:pokead,88:pokesr,240:pokewa,129:ck=1
304 poke2040,11:pokev+28,1
305 gosub380:pokev+29,31:gosub380:pokev+23,1:gosub380:gosub390
310 pokead,00:pokesr,00:pokewa,00
315 gosub392:printh$p$:printtab(32)"crashed"
317 pokev+29,30:pokev+23,0:pokev+21,30:pokev+28,0:goto370
350 gosub392:printh$p$:printtab(32)"aborted":goto370
360 gosub392:fc=fc-3:iffc>4thenfc=4
362 printh$p$:printtab(32)" "
363 printh$p$:printtab(32)mr$(fc);tab(73)"flight":forj=1to4000:nextj:goto370:
370 j=peek(56320):ifjand16then370
371 ifnotjand2thenpokev+21,0:clr:printchr$(147):end
375 gosub395:gosub900:gosub584:ff=peek(v+30):ff=0:ti$="000000":return
380 forj=1to25:z=int(60*rnd(1))+1:poke705+z,j:next:return
390 forj=704to766:pokej,00:next:return
392 printh$:printtab(32)r$"mission"tab(72)r$"report:":return
395 printh$p$:printtab(32)" "tab(72)" ":return
396 rem*********************************
397 rem* lander sprite/pad sprite *
398 rem* collision handler routine *
399 rem*********************************
400 ifv2<-10orabs(x1)>1.5 thengoto300
403 ifff=16andx<210thengoto300
405 printh$p$:printtab(32)"landed ":poke2040,15:pokead,0:pokewa,0
410 ifff=16thengosub495:ifq=1then360
415 ifff=16thenfu=fu+200
435 y=y-1:pokev+1,y
440 ifckthenprinth$p$:printtab(32)"standby":ck=0
450 forj=1to4:ifff=2^jthenifpeek(v+39+j)and5thenfu=fu+300:pokev+39+j,2:fc=fc+1
455 poke(v+43),5
460 nextj:fori=1to1500:next:printh$p$p$:printtab(34)fc
465 printh$p$p$p$;chr$(17)tab(32)ti$p$:printtab(33)str$(int(fu))+" "
470 printp$tab(33)str$(int(a2))+" ":printp$tab(32)"v:"str$(int(v2))+" "
471 hv$=str$(x1*3)+" ":printtab(32)"h:"left$(hv$,5)
475 ifnotpeek(56320)and2then350
480 ifpeek(56320)and16then465
485 v1=5 :c1=2:x1=0:ff=peek(v+30):ff=0:a2=a2+4
490 printh$p$:printtab(32)"active!":return
495 if(notpeek(v+40)and5)and(notpeek(v+41)and5)and(notpeek(v+42)and5)thenq=1
496 return
497 rem*********************************
498 rem* set up sprite data and screen *
499 rem*********************************
500 fori=13to15:forj=0to62:reada:poke(i*64)+j,a:nextj:nexti
504 dimmr$(4):mr$(1)="great":mr$(2)="good":mr$(3)="fair":mr$(4)="poor"
506 printchr$(147):poke53281,11:poke53280,12:forj=55296to56295:pokej,1:nextj
508 forj=1055to2023step40:pokej,160:pokej+of,4 :pokej+8,160:pokej+8+of,4 :nextj
510 forj=1055to1062:pokej,160:pokej+of,4 :pokej+960,160:pokej+960+of,4 :nextj
512 forj=1249to1252:pokej,160:next:forj=1289to1292:pokej,160:next:poke1288,95
515 forj=1064to1984step40:pokej,160:pokej+30,160:next
516 poke1105,223:poke1145,105:poke1225,223:forj=1265to1425step40:pokej,160:next
517 poke1024,81:poke1024+of,2:poke1054,81:poke1054+of,2
518 poke1105,223:poke1145,105:poke1225,223:forj=1265to1425step40:pokej,160:next
520 poke1465,105:poke1745,223:poke1785,160:poke1825,105:poke1905,223
522 poke1945,160:poke1946,223
524 forj=1984to2013:pokej,160:next
526 poke1093,233:forj=1133to1293step40:pokej,160:next:poke1333,95:poke1413,233
530 forj=1453to1893step40:pokej,160:next:poke1933,95:poke1973,233
532 poke1172,233
535 poke1352,223:poke1353,233:poke1391,233:poke1394,105
536 forj=1392to1552step40:pokej,160:next:forj=1393to1953step40:pokej,160:next
538 poke1431,95:poke1592,95:poke1672,95
539 poke1752,233:poke1792,160:poke1832,160:poke1872,95:poke1791,233:poke1831,95
542 poke1471,233:poke1511,160:poke1551,95:poke1510,233
545 poke1434,223:poke1474,160:poke1514,105:poke1554,223:poke1594,160
547 poke1595,223:forj=1634to1954step40:pokej,160:pokej+1,160:next
549 poke1716,233:poke1717,223:poke1757,105:poke1797,223:poke1837,105
550 poke1876,105:poke1916,223:poke1956,105:forj=1756to1836step40:pokej,160:next
552 rem right pinnacle
554 poke1442,223:poke1443,223:poke1444,233:poke1445,223:poke1485,105
556 poke1481,95:forx=1482to1602step40:pokex,160:next
558 forj=1483to1963step40:pokej,160:pokej+1,160:next
560 forj=1525to1965step40:pokej,160:next:forj=1526to1606step40:pokej,160:next
565 forj=1766to1966step40:pokej,160:next:poke1646,105:poke1726,223
567 poke1486,233:poke1567,105:poke1807,223
570 poke1967,233:poke1968,233:poke1451,95:poke1452,160:poke1651,233:poke1691,95
573 poke1492,233:forj=1492to1812step40:pokej,160:next:poke1852,95
575 poke1521,233:poke1561,95:poke1642,95:poke1723,95:poke1763,32:poke1803,233
577 poke1842,233:poke1882,95:poke1922,233
584 p$=chr$(17)+chr$(17)+chr$(17):h$=chr$(19):r$=chr$(18)
585 printh$;chr$(5 ):printtab(32)r$"mission"tab(72)r$"status:"
587 printh$p$p$;chr$(17):printtab(32)r$" time: ":printp$tab(32)r$" fuel: "p$
591 printtab(32)r$" alt: "p$:printtab(32)r$" vel: "
596 printh$p$p$tab(32)r$"refuels"
597 return
896 rem*********************************
897 rem* define and enable sprites *
898 rem* 1 thru 5 and game variables *
899 rem*********************************
900 v=53248:x=219:y=70:d=3:cr=0:pokev+31,0:fu=0:a2=456:v1=0:x1=0
910 pokev+21,31:poke2040,15:pokev,x:pokev+1,y:pokev+27,1:ck=1:q=0:v2=0
916 poke2041,13:poke2042,13:poke2043,13:poke2044,13
918 pokev+2,48:pokev+3,242:pokev+4,124:pokev+5,242:pokev+6,215:pokev+7,242
919 pokev+8,210:pokev+9,90
920 pokev+39,15:pokev+40,5:pokev+41,5:pokev+42,5:pokev+43,2
922 pokev+29,30:pokev+37,7:pokev+38,2
930 forj=54272to54296:pokej,0:next:wa=54276:ad=54277:sr=54278:nl=54272:nh=54273
940 pokenl,216:pokenh,12:fc=0
950 return
996 rem*********************************
997 rem* data for sprite data block *
998 rem* 13, 14, and 15 *
999 rem*********************************
1000 data255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
1002 data255,255,255,255,255,255,255
1003 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1004 data0,0,0,0,0,0,32,254,24,35,255,160,31,255,216,15,255,192,31,255,192
1006 data63,255,248,127,255,252,127,255,252,127,255,248,63,255,240,15,255,240
1008 data19,255,152,38,56,68,120,124,62,64,254,2,64,210,2,64,169,2
1010 data65,85,2,194,51,131,0,0,0
1012 data0,0,0,32,254,24,35,255,160,31,255,216,15,255,192,31,255,192
1014 data63,255,248,127,255,252,127,255,252,127,255,248,63,255,240,15,255,240
1016 data19,255,152,38,56,68,120,124,62,64,254,2,64,0,2,64,0,2
1018 data64,0,2,192,0,3,0,0,0